<!DOCTYPE html>
<html>
<head>
    <script type="text/javascript" src="jquery/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="jQuery.counter.js"></script>
    <title>Counter test</title>
</head>
<body>
    <span style="font-size: 13px; font-family: Arial; color: #cacaca">Counter test:</span>
    <div id="counter"></div>
    <div style="clear: both;"></div>
    <input type="text" value="294387654" id="number" />
    <input type="button" value="setCounter" onclick="$('#counter').counter('setCounter', $('#number').val())" />
    <div style="clear: both;"></div>
    <input type="text" value="112" id="addValue" />
    <input type="button" value="addValue" onclick="$('#counter').counter('addValue', $('#addValue').val())" />
    <script type="text/javascript">
        $('#counter').counter({digits: 9});
    </script>
</body>
</html>